package com.itheima.dao;


import com.github.pagehelper.Page;
import com.itheima.pojo.Menu;
import com.itheima.pojo.Permission;
import com.itheima.pojo.Role;

import java.util.List;
import java.util.Map;

public interface MenuDao {

    void edit(Menu menu);

    Menu editById(Integer id);

    long findRelationById(Integer id);

    void deleteById(Integer id);

    Page<Menu> findByCondition(String queryString);

    void add(Menu menu ,Integer level);

    List<Integer> findParentMenuId();

    Integer findMaxPath(Integer level);

    long findWhetherExists(String path);

    Integer findMaxPriority(Integer level);

    String findMaxPriorityByCondition(Integer level, String parentMenuId);

    Integer findParentId(String parentMenuId);

    List<Menu> findAll();



    List<Role> findRolesByUsername(String username);

    List<Permission> findPermissionByRoleId(Integer id);


    List<Map<String,Object>> findNumOneMenuByRoleId(Integer id);


    List<Map<String,Object>> findNumTwoMenuByRoleId(Integer id);



}
